package com.zj.guava.eventbus;

import com.google.common.eventbus.Subscribe;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.time.Instant;

public abstract class AbstactListener {
    private static final Logger logger = LoggerFactory.getLogger(AbstactListener.class);

    @Subscribe
    public void doAction(String event) {

        try {
            Thread.sleep(200);
            logger.info("AbstactListener process event:{},time:{}", event, Instant.now());

        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
